// 新增
export const useCreateTable = (onSave, callback?: any) => {
  const createTableApi = (params, sourceParams) => {
    return new Promise((resolve, reject) => {
      let resparams = params;
      if (callback) {
        resparams = callback(params, sourceParams);
      }
      onSave(resparams)
        .then(() => {
          resolve(true);
        })
        .catch((err) => {
          reject(err);
        });
    });
  };
  return {
    createTableApi,
  };
};
